export default {
  // Global page headers: https://go.nuxtjs.dev/config-head
  head: {
    title: 'firstStudy',
    htmlAttrs: {
      lang: 'en',
    },
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', name: 'description', content: '' },
    ],
    link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
  },
  // 在这里将 npm run dev 后的访问端口号进行修改
  // server: {
  //   port: 8000,     // default: 3000
  //   // host: '0.0.0.0' // default: localhost
  // },

  // Global CSS: https://go.nuxtjs.dev/config-css
  css: [
    'element-ui/lib/theme-chalk/index.css',
    'assets/main.css',
    // 直接加载一个 Node.js 模块。（在这里它是一个 Sass 文件）
    // 'bulma',
    // 项目里要用的 CSS 文件
    // '@/assets/css/main.css',
    // 项目里要使用的 SCSS 文件
    // '@/assets/css/main.scss',
  ],
  router: {
    middleware: 'auth',
  },
  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: [
    '@/plugins/element-ui',
    '@/plugins/vue-inject.js',
    '@/plugins/ctx-inject.js',
  ],

  // Auto import components: https://go.nuxtjs.dev/config-components
  components: true,

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: [
    // https://go.nuxtjs.dev/eslint
    '@nuxtjs/eslint-module',
  ],

  // Modules: https://go.nuxtjs.dev/config-modules
  modules: [
    // https://go.nuxtjs.dev/axios
    '@nuxtjs/axios',
  ],

  // Axios module configuration: https://go.nuxtjs.dev/config-axios
  axios: {},

  // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {
    transpile: [/^element-ui/],
  },
}
